1. Field of the Invention
The present invention relates to an image-processing method and image processor for filtering image data to operatively remove encoding-caused noises.
2. Description of the Related Art
Encoded and decoded images over a videophone and a TV conference have heretofore been used to provide a reduced amount of image information in order to achieve efficient image transmission.
A majority of such an image encoding-decoding method in recent years uses discrete cosine transform.
The discrete cosine transform achieves a substantial reduction in image information amount. At the same time, the discrete cosine transform brings up a problem of peculiar Gaussian noise called a mosquito noise. The noise appears on a decoded image, and spoils subjective image quality.
The Gaussian noise as represented by the mosquito noise is removable using a spatial filter. The spatial filter functions to remove high-frequency components.
The following specifically discusses filtering, in which image data having a QCIF (quarter common intermediate format) size (144 lines by 176 pixels) is filtered as an illustration. Each gang of three-pixels-by-three-pixels image data is filtered. A pixel located at the center of three pixels-by-three pixels has target image data subject to filtering.
FIG. 25 is a block diagram illustrating a prior art image processor designed to filter target image data subject to filtering.
As shown in FIG. 25, the prior art image processor includes a processor 500, an image memory 501, line buffers 502 and 504, and a filtering circuit 503.
The processor 500 includes a source memory 505 and a destination memory 506.
The processor 500 reads out encoded image data from the image memory 501 and writes the same encoded image data into the source memory 505.
The processor 500 decodes the encoded image data in the source memory 505.
The processor 500 at first stores the decoded image data into the destination memory 506, and then transfers the same image data to the image memory 501.
The decoded image data in the image memory 501 are filtered.
In order to filter the decoded image data, 3-lines-by-176-pixels image data are transmitted to the line buffer 502 from the image memory 501.
The line buffer 502 stores the transmitted 3-lines-by-176-pixels image data.
The filtering circuit 503 reads out the three pixels-by-three pixels image data from the line buffer 502 to filter a piece of target image data subject to filtering.
The filtering circuit 503 repeats the above steps, thereby filtering 174-pieces of target image data subject to filtering that are stored in the line buffer 502.
Image data located in a central line of 3-lines-by-176-pixels (except for image data at opposite ends of the central line) among the 3-lines-by-176-pixels image data in the line buffer 502 are target image data subject to filtering.
The filtering circuit 503 feeds the filtered 174-pieces of image data into the line buffer 504.
At the same time, the filtering circuit 503 feeds the image data at opposite ends of the central line as previously discussed into the line buffer 504 without filtering them.
As a result, the line buffer 504 stores a line (176-pieces) of filtered image data.
As discussed above, the past practice is to transmit the image data to the line buffer 502 for each gang of 3-lines-by-176-pixels, thereby filtering the QCIF-sized image data.
Details of the filtering are now discussed.
FIG. 26 is a block diagram illustrating the filtering circuit 503 as shown in FIG. 25. FIG. 26 illustrates the same reference characters on the same components as those shown in FIG. 25.
As shown in FIG. 26, the filtering circuit 503 includes a data readout unit 507, a filtering unit 508, and a data write unit 509.
As shown in FIG. 26, assume that the line buffer 502 is designed to store the 3-lines-by-176-pixels image data at maximum.
The data readout unit 507 reads out image data from the line buffer 502.
The filtering unit 508 filters the read image data.
The data write unit 509 writes the filtered image data to the line buffer 504.
The line buffer 504 is constructed to store a line (176-pixels) of image data at maximum.
The prior art image processor repeats the following steps: the data readout unit 507 reads out three-pixels-by-three-pixels image data from the line buffer 502; the filtering unit 508 filters the read three pixels-by-three pixels image data; and the data write unit 509 writes a pixel to the line buffer 504.
The following discusses the filtering with reference to a specific example.
FIG. 27 is a descriptive illustration showing how image data in “N”-line of a QCIF image are filtered in a conventional manner.
FIG. 28 is a descriptive illustration showing how image data in “N+1”-line of the QCIF image are filtered in a conventional manner.
As shown in FIG. 27, the data readout unit 507 reads out three-pixels-by-three-pixels image data 600 to perform the first filtering.
The filtering unit 508 filters image data (N, 2) using surrounding image data (N−1, 1), (N, 1) (N+1, 1), (N−1, 2), (N+1, 2), (N−1, 3), (N, 3) and (N+1, 3).
The data write unit 509 writes the filtered image data (FN, 2) to the line buffer 504.
The data readout unit 507 reads out three-pixels-by-three-pixels image data 601 to execute the second filtering.
The filtering unit 508 filters image data (N, 3) using surrounding image data (N−1, 2), (N, 2) (N+1, 2), (N−1, 3), (N+1, 3), (N−1, 4), (N, 4) and (N+1, 4).
The data write unit 509 writes the filtered image data (FN, 3) to the line buffer 504.
The above steps are repeated 174-times. As a result, the line buffer 504 stores “N”-line of image data (N, 1), (FN, 2) to (FN, 175), and (N, 176).
Upon completion of the filtering of the image data in “N”-line, image data in “N+1”-line are filtered, as shown in FIG. 28.
Deleting “N−1”-line, “N+2”-line is added as the last line.
In this way, lines to be filtered are selected in sequence to repeat the above steps.
In general, pixels at both ends of the central line where surrounding pixels are absent are not filtered. In addition, pixels in the first line as well as the 144th line are not filtered.
Accordingly, 142-lines-by-174-pixels image data are filtered. This means that separate steps must be taken to decode the QCIF image.
As previously discussed, filtering the image data using the prior art image processor requires one line buffer (the line buffer 502 according to the above example) adapted for plural lines (three lines according to the above example) and another line buffer (the line buffer 504 according to the above example) designed to store a line of filtered image data, in accordance with the number of pixels to be filtered at a time (three pixels-by-three pixels according to the above example). For details, refer to the published Japanese Patent Application Laid-Open No. 2000-251065.
Such a requirement causes a problem of an area increase in an image processor.
Another problem is that the image data are filtered in a lengthy time because each gang of three-pixels-by-three-pixels image data is read out, for each time of the filtering, from the line buffer 502 to repeat the above steps. For details, refer to the published Japanese Patent Application Laid-Open No. 7-111586.
Furthermore, in order to process edgewise pixels, only a predetermined number of pixels are processed.
This causes a further problem that a change in image size precludes the filtering of the image data.